import requests

r=requests.head("http://www.baidu.com/")
print(r.headers)
{'Server':'bfe/1.0.0.18','Date':'Sat,24 Nov 2018 04:29:18 GMT','Content-Type':'text/html',
 'Last-Modified':'Mon, 13 jun 2016 02:50:08 GMT','Connection':'Keep-Alive','Cache-Control':
 'private, on-cache, no-store, proxy-revalidate, no-transform','Pragma':'no-cache','Contentt-Enco-ding':'gzip'}